
const { Controller } = require('egg');


class commentController extends Controller {
  // 获取评论
  async getCommentPage() {
    const { ctx } = this;
    const info = ctx.request.query;
    await ctx.service.comment.getPage(info,ctx);
  }
  // 添加评论
  async addComment() {
    const { ctx } = this;
    const info = ctx.request.body;
    await ctx.service.comment.add(info,ctx);
  }
  // 删除评论
  async delete() {
    const { ctx } = this;
    const info = ctx.request.body;
    await ctx.service.comment.delete(info,ctx);
  }
}

module.exports = commentController;